<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>后台管理系统登录</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css">
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        .wrap img {
            width: 100%;
            height: 100%;
            position: fixed;
            top: 0;
            left: -10;
            z-index: -10;
        }

        .content {
            color: whitesmoke;
            position: absolute;
            top: 150px;
            left: 150px;
        }

        .content h1 {
            font-size: 65px;
            font-weight: 750;
        }

        .content p {
            font-size: 52px;
            font-weight: 400;
        }

        .form {
            margin-top: 100px;
            border-radius: 18px;
            width: 410px;
            height: 400px;
            background-color: #ffffff;
            opacity: 0.9;
            position: absolute;
            right: 150px;
            padding: 20px 40px;
        }

        form input {
            border: 1px solid #E0E0E0;
        }

        a {
            text-decoration: none;
            color: #2E58FF;
            font-size: 12px;
        }
    </style>
</head>

<body>
    <div class="wrap">
        <img src="https://pic.90sheji.com/back_origin_pic/05/68/67/192bd469c6fb92d8e8857e011adbefdd.jpg%21/fh/465/quality/90/unsharp/true/compress/true/canvas/1000x465a0a0/cvscolor/FFFFFFFF"
            alt="">
    </div>
    <div class="content text-center">
        <h1>米菲兔</h1>
        <p>呵护口腔健康</p>
    </div>
    <div class="form ">
        <div class="mt-5">
            <h1>欢迎登录</h1>
            <div class="input-group mt-4">
                <input type="text" class="form-control" aria-label="Sizing example input"
                    aria-describedby="inputGroup-sizing-default" placeholder="请输入姓名..." id="inpname">
            </div>
            <div class="input-group mt-4">
                <input type="text" class="form-control" aria-label="Sizing example input"
                    aria-describedby="inputGroup-sizing-default" placeholder="请输入密码..." id="inppwd">
            </div>
            <div class="input-group mt-4">
                <button type="button" class="btn btn-outline-secondary form-control login">登录</button>
            </div>
        </div>
    </div>
    <script>
        $('.login').click(function () {
            $.ajax({
                method: 'get',
                url: 'http://localhost:3000/user/adminlogin',
                data: {
                    "username": $('#inpname').val(),
                    "password": $('#inppwd').val(),
                },
                success: function (data) {
                    // alert(data.msg)
                    location.href = '/home.html'
                },
                error: function (e) {
                    console.log(JSON.stringify(e));
                }
            })
        })
    </script>
</body>

</html>